﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework;

namespace BostonXNA.InputHandling.Input
{
    class GamePadButtonDownActivity : InputActivity
    {
        public Buttons Button;
        public override bool Check(InputState state)
        {
            return state.GamePad.Current.IsButtonDown(Button);
        }
    }

    class GamePadButtonUpActivity : InputActivity
    {
        public Buttons Button;
        public override bool Check(InputState state)
        {
            return state.GamePad.Current.IsButtonUp(Button);
        }
    }

    public enum ThumbStick
    {
        Left,
        Right
    }
    class GamePadThumbstickActivity : InputActivity
    {
        public ThumbStick ThumbStick;
        public override bool Check(InputState state)
        {
            switch (ThumbStick)
            {
                case ThumbStick.Left:
                    return state.GamePad.Current.ThumbSticks.Left != Vector2.Zero;
                case ThumbStick.Right:
                    return state.GamePad.Current.ThumbSticks.Right != Vector2.Zero;
            }
            return false;
        }
    }
}